import Vue from 'vue'
import Router from 'vue-router'
import Login from '../pages/Login.vue'
// 管理员端
import AdminHome from '../pages/admin/AdminHome.vue'
import CourseInfo from '../pages/admin/CourseInfo.vue'
import CourseType from '../pages/admin/CourseType.vue'
import Index from '../pages/admin/Index.vue'
import News from '../pages/admin/News.vue'
import OrderManager from '../pages/admin/OrderManager.vue'
import PersonalCenter from '../pages/admin/PersonalCenter.vue'
import StudentManager from '../pages/admin/StudentManager.vue'
import TeacherManager from '../pages/admin/TeacherManager.vue'
import TestManager from '../pages/admin/TestManager.vue'
// ----------------------------------------------------------------------------------
// 教师端
import TeacherHome from '../pages/teacher/TeacherHome.vue'
import TeIndex from '../pages/teacher/Index.vue'
import TePersonalCenter from '../pages/teacher/PersonalCenter.vue'
import TeStudentManager from '../pages/teacher/StudentManager.vue'
import TeProfessionalInfo from '../pages/teacher/ProfessionalInfo.vue'
import TeCourseType from '../pages/teacher/CourseType.vue'
import TeTestManager from '../pages/teacher/TestManager.vue'
import TeOrderManager from '../pages/teacher/OrderManager.vue'
// ------------------------------------------------------------------------------------------
// 学生端
import StudentHome from '../pages/student/StudentHome.vue'
import StuIndex from '../pages/student/Index.vue'
import StuCourseInfo from '../pages/student/CourseInfo.vue'
import StuTestList from '../pages/student/TestList.vue'
import Discuss from '../pages/student/Discuss.vue'
import StuStudyCourse from '../pages/student/StudyCourse.vue'
import StuPersonalCenter from '../pages/student/PersonalCenter.vue'
import StuOrderCourse from '../pages/student/OrderCourse.vue'
// ------------------------------------------------------------------------------------------
import UploadImage from '../components/common/UploadImage.vue'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/Login',
      name: 'Login',
      component: Login,
    },

    {
      path: '/Upload',
      name: "Upload",
      component: UploadImage,

    },


    {
      path: '/AdminHome',
      name: 'AdminHome',
      component: AdminHome,
      children: [
        {
          path: '/CourseInfo',
          name: 'CourseInfo',
          component: CourseInfo
        },
        {
          path: '/CourseType',
          name: 'courseType',
          component: CourseType
        },
        {
          path: '/Index',
          name: 'index',
          component: Index
        },
        {
          path: '/News',
          name: 'news',
          component: News
        },
        {
          path: '/OrderManager',
          name: 'orderManager',
          component: OrderManager
        },
        {
          path: '/PersonalCenter',
          name: 'personalCenter',
          component: PersonalCenter
        },
        {
          path: '/StudentManager',
          name: 'studentManager',
          component: StudentManager
        },
        {
          path: '/TeacherManager',
          name: 'teacherManager',
          component: TeacherManager
        },
        {
          path: '/TestManager',
          name: 'testManager',
          component: TestManager
        },
      ]
    },


    {
      path: '/TeacherHome',
      name: 'TeacherHome',
      component: TeacherHome,
      children: [
        {
          path: '/TeCourseType',
          name: 'teCourseType',
          component: TeCourseType
        },
        {
          path: '/TeIndex',
          name: 'teIndex',
          component: TeIndex
        },
        {
          path: '/TeOrderManager',
          name: 'teOrderManager',
          component: TeOrderManager
        },
        {
          path: '/TePersonalCenter',
          name: 'tePersonalCenter',
          component: TePersonalCenter
        },
        {
          path: '/TeProfessionalInfo',
          name: 'teProfessionalInfo',
          component: TeProfessionalInfo
        },
        {
          path: '/TeStudentManager',
          name: 'teStudentManager',
          component: TeStudentManager
        },
        {
          path: '/TeTestManager',
          name: 'teTestManager',
          component: TeTestManager
        },
      ]

    },

    {
      path: '/StudentHome',
      name: 'StudentHome',
      component: StudentHome,

      children: [
        {
          path: '/StuCourseInfo',
          name: 'stuCourseInfo',
          component: StuCourseInfo
        },

        {
          path: '/StuTestList',
          name: 'stuTestList',
          component: StuTestList
        },
        {
          path: '/StuIndex',
          name: 'stuIndex',
          component: StuIndex
        },


        {
          path: '/Discuss',
          name: 'discuss',
          component: Discuss
        },

        {
          path: '/StuStudyCourse',
          name: 'stuStudyCourse',
          component: StuStudyCourse
        },

        {
          path: '/StuPersonalCenter',
          name: 'stuPersonalCenter',
          component: StuPersonalCenter
        },

        {
          path: '/StuOrderCourse',
          name: 'stuOrderCourse',
          component: StuOrderCourse
        },


      ]

    },


  ]
})
